package com.ict.web.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ict.web.domain.ExpertInformationSheet;
import com.ict.web.dto.ExpertInformationSheetDto;
import com.ict.web.dto.QueryExpertInformationSheetDto;
import com.ict.web.vo.ExpertInformationSheetDetailVo;
import com.ict.web.vo.ExpertInformationSheetListVo;
import com.ict.web.vo.ExtractRuleBeginVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 专家库信息Mapper接口
 *
 * @author liujie
 * @date 2022-02-23
 */
@Mapper
public interface ExpertInformationSheetMapper extends BaseMapper<ExpertInformationSheet>
{
    /**
     * 查询专家库信息
     *
     * @param userId 专家库信息主键
     * @return 专家库信息
     */
    public ExpertInformationSheetDetailVo getInfoByUserId(Long userId);
    /**
     * 查询专家库信息
     *
     * @param expertId 专家库信息主键
     * @return 专家库信息
     */
    public ExpertInformationSheetDetailVo selectExpertInformationSheetByExpertId(Long expertId);

    /**
     * 查询专家库信息列表
     *
     * @param expertInformationSheet 专家库信息
     * @return 专家库信息集合
     */
    public List<ExpertInformationSheetDetailVo> selectExpertInformationSheetList(@Param("expertInformationSheet") ExpertInformationSheet expertInformationSheet,
                                                                                 @Param("ormId") Long ormId,
                                                                                 @Param("expertIds") List<Long> expertIds);
    List<Long> selectRandomOne(@Param("peopleNumber") String peopleNumber,
                               @Param("ormId") Long ormId,
                               @Param("expertIds") List<Long> expertIds,@Param("collectExtractId") List<Long>  collectExtractId);
    List<ExtractRuleBeginVo> selectListById(@Param("list") List<Long> list);

    /**
     * 查询专家（查询实体）列表
     * @param queryDto
     * @return
     */
    public List<ExpertInformationSheetListVo> selectExpertInfoSheetList(@Param("queryDto") QueryExpertInformationSheetDto queryDto,
                                                                        @Param("ormId") Long ormId,
                                                                        @Param("expertIds") List<Long> expertIds);
    /**
     * 专家抽取-条件查询
     * @param dto
     * @return
     */
    List<Long> conditionSelect(@Param("dto") ExpertInformationSheetDto dto,@Param("ormId") Long ormId,@Param("collectExtractId") List<Long> collectExtractId);
}
